<html>
<head><title>About Lore</title>
<body>
<h1>About</h1>
<p>
	Lore is a low-level programming language. It has an assembler, simple bytecode format and a VM and debugger. A major goal is simplicity, so much that it forgoes everything that is unessential (e.g. a stack, or function calling convention) to focus on it's unique ability: extreme reflection. It has an unparalleled and unresited run-time inspection and modification that even makes dynamic languages like lisp/python/javascript feel ridgid.
</p>
<p>
	Unlike normal (x86 / arm etc.) assembly, lore is actually designed for run-time reflection (not merely allowing it). With a traditional memory address scheme inserting and removing instructions would be chaotic (address lookup of anything after that point would be off), but lore takes inspiration from "source" programming (e.g. c++) where inserting/removing/adding lines has predictable behavior and does this in a very efficient manner.
</p>
<p>
	Another very important characteristic of lore is that it's totally safe to run. It (by design) has zero ability to interact (at all) with the system. It is completely and totally "sandboxed" and only has access to the input it is explicitly given, and the only thing it can do is modify itself and give output. When run, it has a hard limit to the amount of memory it can use, and it's not even possible for it to crash. Unfortunately, it can get caught in an infinite loop (only because I haven't yet solved the halting problem) but it is easy to set terminate, or only run for a max amount of time
</p>
<p>
	A higher level language (e.g. python) could technically be given the reflective attributes (primarily by exposing the full program through an abstract syntax tree) however it would be so complex to do anything reflectively as to be useless
</p>
<h1>Program</h1>
<p>A lore program is totally and entirely made up of a list of instructions. Both at run-time and development-time, there's no dynamic memory, no registers, just a list of instructions. After one instruction is run, the subsequent instruction is run. This is modelled with a (circular) linked-list. Each instruction has a next instruction. However there's stuff, like conditional-jumps (AKA if statements) that need "random access", so we achive this, by giving <em>every</em> instruction an identifier. We use an intrusive AVL tree (for high performance, especially look-ups) for mapping identifiers to instructions. All introspection and jump instruction work on identifiers, as opposed to memory addresses. This is how we avoid chaotic behavior when adding and removing instructions. 


</p>


</body>
</html>
